<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="org.lsms.dao.impl.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>Author View Suggestion Page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="LSMS,ICSEE,AUTHOR">
	
	<link rel="stylesheet" type="text/css" href="../css/author_layout.css">
	<link rel="stylesheet" type="text/css" href="../css/hyper_link_style.css">

  </head>
  
  <body>
	<div id="container">
		<div id="header" class="logo_image"></div>
		<div class="nav"></div>
		<div id="author_menu" class="border">
			<table border="0" width="100%"  >
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../index.jsp">Home</a></td>
				</tr>
				<tr>
				<%
					DaoImpl impl = new DaoImpl();
					HashMap<String,Integer> hm = impl.get_site_setting();
					int paper_submit = hm.get("paper_submit");
					if(paper_submit==1){
				 %>
					<td  bgcolor="#CCCCCC"><a href="submit_paper.jsp">Submit Paper</a></td>
				<%
					}else{
				 %>
				 	<td  bgcolor="#CCCCCC"><a href="../error/submit_paper_forbidden.jsp">Submit Paper</a></td>	
				<%
					}
				 %>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="paper_history.jsp">History / Paper Status</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="register_info.jsp">Register Information</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="modify_info.jsp">Modify Information</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../logout">Log Out</a></td>
				</tr>
			</table>
		</div>
		
		<div id="content" class="bg_color border">
			<div style="margin:15px">
			<p><b>Suggestions</b></p>
			<p align='left'>Chair's suggestion</p>
				<div class='border'>
				<p align='left'>
				<%
					int paper_id = Integer.parseInt(request.getParameter("paper_id"));
					String chair_to_author	= impl.get_chair_suggestion(paper_id);
					if(chair_to_author==""){
						out.print("<font color='red'>No suggestion!</font>");
						}else{
						out.print(chair_to_author);		
					}
				%>
				</p>
				</div>
				<hr>
				
				
				<p align='left'>Reviewers' suggestions</p>
				<div class='border'>
				
				<%
					HashMap<String,List<String>> map = impl.get_reviewer_suggrstion(paper_id);
					List<String> list = map.get("all");
					if(list.size()<1){
				%>
				<p align='left'>
				<font color='red'>No Suggestions!</font>
				</p>
				<%
					}
					for(int i=0;i<list.size();i++){
				%>
				<p align='left'>
				<%	
						String sugg = list.get(i);
						out.print("<font color='blue'>Reviewer "+(i+1)+": </font>");
						if(sugg==""){
							out.print("No suggestion!");
							out.print("<hr>");
						}else{
						out.print(sugg);
						out.print("<hr>");
						}
					}
				%>
				</p>
				</div>
				
				<br>
				<a href="javascript:history.go(-1)">Back</a>
				
			</div>
		</div>
		
		<div class="nav"></div>
			
		<div id="footer" class="footer_color border">
			<p align="center"><b>&copy;2010 LSMS-All Rights Reserved.</b></p>
			<p align="center"> <b>Powered by Shu.</b></p>
		</div>
	</div>
  </body>
</html>
